package com.engineering.elink.interceptor;
/**
 * 例外,不需要过滤或拦截的请求
 * @author hxjxiaojun
 *
 */
public class Except {
	static String[] resources={"/api/category/getTopCategory","/api/category/getSecondaryCategory","/api/category/getDetailCategory"
		                                  ,"/api/category/getBuildCategory","/api/category/getSkillTopCategory","/api/file/getList"
		                                  ,"/api/file/getFileBest","/api/file/getFile","/api/file/getDownLoadRank","/api/file/getRelevant","/api/file/getRelevantType","/api/file/getPreviewPngOfFile","/api/comment/getTopCommentsById" ,"/api/comment/getAllCommentsByTopId" 
		                                    ,"/api/file/getFileSystem","/api/file/get","/api/file/getShare","/api/file/getLike","/api/file/getHotFile","/api/type/list",
		                                    "/api/subject/getList","/api/subject/getInfo","/api/subject/getBaseInfo"
		                                    ,"/api/file/getBatch","/api/file/upload","/api/file/getTest","/api/file/getTest2"};
	
	/**
	 * 判断url是否是例外
	 * @param url
	 * @return
	 */
	static boolean isExcept(String url){
		boolean flag=false;
		for(String r:resources){
			if(url!=null&&url.endsWith(r)){
				flag=true;
				break;
			}
		}
		return flag;
	}
}
